package cz.mzk.oai.metadataRepository.metadata;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author Martin Rehanek, Martin.Rehanek@gmail.com
 */
public class DataField {

    private Map<Character, String> subFields = null;

    public DataField(int initialCapacity) {
        subFields = new HashMap<Character, String>(initialCapacity);
    }

    public String getSubfield(Character code) {
        return subFields.get(code);
    }

    public String getSubfield(char code) {
        return getSubfield(Character.valueOf(code));
    }

    public void setSubfield(Character code, String value) {
        subFields.put(code, value);
    }

    public void setSubfield(char code, String value) {
        setSubfield(Character.valueOf(code), value);
    }
}
